<?php
/*
 * Created on 2013-12-5
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 	header("Content-type: text/html; charset=utf-8"); 
 	
 	include("/common/constants.php");
 	
?>
<html>
<head>
	<script type="text/javascript" src="./resource/js/seed-min.js"></script>
	<link href="./resource/css/index.css" type="text/css" rel="stylesheet"></link>
	<link rel="shortcut icon" href="./resource/ico/tab.ico"/>
</head>
<body>
	<div id="container">
		
		<!-- page header -->
		<div id="header">
			<div id="toolbar" style="height:10px;width:100%;"><span>Home</span><span>Favorite</span></div>
			<div id="logo"	  style="height:100%;width:100%;background-image:url('./resource/img/top003.png');background-repeat:no-repeat;background-positon:">
				
			</div>
		</div>
	
		<!-- menu -->
		<div id="top_menu">
			<ul>
				<li>
					<a href="./biz/testBiz.php" >1.Link1 Test</a>
				</li>
				<li><a href="./biz/testKissy.php">2.Kissy Test</a></li>
				<li><a href="./biz/testPage.php">3.Test Page</a></li>
			</ul>
		</div>
		
		<BR/><hr/>
		
		
		<!--content-->
		<div id="content">
		<?php 
			//字符串常量测试
			define('ROOT_PATH',dirname(__FILE__));
			define('FILE_SEPRATOR',DIRECTORY_SEPARATOR	);
			$FILE_SEPARATOR = '123';
			echo constant('ROOT_PATH'),$FILE_SEPARATOR,constant('FILE_SEPRATOR');	//同时打印多个变量
			echo defined('ROOT_PATH');  //检查常量ROOT_PATH是否已定义 ，若已定义则显示为1 即true
			

		
			
			echo constant('DB_ADMIN');
			
			
		 	
		 	//数据库连接测试
			$dbhost = 'localhost'; 	//或者"127.0.0.1"
			$dbuser = 'root';		//你的mysql用户名
			$dbpassword= 'root'; 	//你的mysql密码
			$dbname = 'wordpress'; 	//你的mysql库名
			$connect = mysql_connect($dbhost,$dbuser,$dbpassword);
			if ($connect) {
				echo '连接成功';
			} else {
				echo '连接失败';
			}
		 	
		?>
			<div>
				<table style="margin:auto;">
					<tr>
						<td class="gray">Syntax Name</td>
						<td class="gray">Result</td>
					</tr>
					<tr>
						<td>define('ROOT_PATH',dirname(__FILE__));</td>
						<td><?php echo constant('ROOT_PATH'); ?></td>
					</tr>
					<tr>
						<td>FILE_SEPRATOR</td>
						<td><?php echo constant('FILE_SEPRATOR'); ?></td>
					</tr>
					<tr>
						<td>DOCUMENT_ROOT</td>
						<td><?php echo $_SERVER['DOCUMENT_ROOT']; ?></td>
					</tr>
					<tr>
						<td>$_SERVER['REQUEST_URI'];</td>
						<td><?php echo $_SERVER['REQUEST_URI']; ?></td>
					<tr>
					<tr>
						<td>$_SERVER['PHP_SELF'];</td>
						<td><?php echo $_SERVER['PHP_SELF']; ?></td>
					<tr>
					<tr>
						<td>$_SERVER['SCRIPT_FILENAME'];</td>
						<td><?php echo $_SERVER['SCRIPT_FILENAME']; ?></td>
					<tr>
					<tr>
						<td>PHP_VERSION;</td>
						<td><?php echo PHP_VERSION; ?></td>
					<tr>
					<tr>
						<td>$_SERVER['HTTP_HOST'] ;</td>
						<td><?php echo $_SERVER['HTTP_HOST'] ; ?></td>
					<tr>
					<tr>
						<td>$_SERVER['HTTP_REFERER'] -- 链接到当前页面的前一页面的 URL 地址。</td>
						<td><?php echo $_SERVER['HTTP_REFERER']; ?></td>
					<tr>
					<input type="number" class="button" name="name" value="value" />
				</table>
			</div>
			<a href="www.g.cn">进入商城</a>
		</div>
		
		<div id="backToTop" >
			<a href="#">Top</a><!-- back to top-->
		</div>
		<br/><hr/>
		<!-- foot -->
		<div id="bottom">
			
		</div>
	</div>
</body>
<script type="text/javascript">
//kissy 引入测试
KISSY.ready(function(S){
   // alert('Hello World!');
});


</script>
</html>
